home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / LIBRARY / SLTPU70C / XFORMAT.DOC < prev   
Text File  |  1991-03-04  |  4KB  |  92 lines

  1.  
  2. -------------------------------------
  3.     Discussion of File Formats for
  4.  SLBBS Upload/Download Temporary Files
  5.     (UPLIST.BBS and FILELIST.BBS)
  6. --------------------------------------
  7.  
  8. Two temporary files called UPLIST.BBS and FILELIST.BBS are created by 
  9. Searchlight 2.0 during uploads and downloads, respectively.  These files 
  10. exist in the SLBBS home directory area.  Below we give the formats to these
  11. files, and discuss possible ways in which they may be used by programs.
  12.  
  13.  
  14. UPLIST.BBS File
  15.  
  16.     The UPLIST.BBS file consists of a single record (ulisttype) which in 
  17. turn contains a count, and an array of subrecords (uspectype):
  18.  
  19.      uspectype = record
  20.        name: string[12];      { filename }
  21.        descrip: string[40];   { short description }
  22.        edescrip: array[1..2]  { long description }
  23.          of string[60];
  24.      end;
  25.  
  26.      uplisttype = record
  27.        count: integer;
  28.        files: array[1..40] of uspectype;
  29.      end;
  30.  
  31.  
  32.     UPLIST.BBS is a temporary file which is used to contain the filenames 
  33. and descriptions - if any - input by a user prior to executing an external 
  34. protocol upload.  Searchlight rereads this file after the upload and tries 
  35. to match the stored filenames to those recorded by the upload procedure.
  36.  
  37.     Upload protocol applications can change the UPLIST.BBS file before 
  38. returning to Searchlight.  For example, if you install an automatic 
  39. procedure to convert ARC files to ZIP, you would want to change the 
  40. filenames in the UPLIST.BBS directory so that Searchlight would recognise 
  41. the user's description of the file.  It would also be possible to add 
  42. descriptions for files which lack them, or edit existing descriptions.
  43. Of course, since the UPLIST.BBS file is used only when Searchlight resumes 
  44. from an upload, any changes would have to be made by the upload command 
  45. itself (or as part of a batch file which calls the upload protocol, then 
  46. executes additional programs).
  47.  
  48.  
  49. FILELIST.BBS File
  50.  
  51.     The FILELIST.BBS file consists of the single record filelist, which is 
  52. made up of a file count, a total file size, and a list of subrecords 
  53. containing the data, as follows:
  54.  
  55.      fspectype = record        { returned file spec }
  56.        name: string[12];      { filename }
  57.        length: integer;       { size in blocks }
  58.        dir: string[12];       { source directory name }
  59.        rec: longint;          { record # in directory }
  60.        romcopy: boolean;      { set if file to be copied }
  61.        data: dirtypeptr;      { pointer: always NIL }
  62.      end;
  63.  
  64.      filelist = record
  65.        count: integer;
  66.        totalsize: longint;
  67.        data: array[1..40] of fspectype;
  68.      end;
  69.  
  70.     
  71.     FILELIST.BBS is used by Searchlight to record the names of all files 
  72. selected prior to executing an external protocol download command.  After 
  73. the download completes, Searchlight reads this data back in and uses it to 
  74. update the user's total KBytes downloaded, increment the download count for 
  75. each selected file, and update the files log.
  76.  
  77.     Searchlight BBS can only detect an error code (success or failure) from 
  78. external download protocols, and thus is limited to either recording that 
  79. all files or no files were successfully downloaded.  However, external 
  80. download procedures which want to exert greater control over download 
  81. logging can do so by modifying the FILELIST.BBS file prior to returning 
  82. control to Searchlight.  For example, a DSZ based application could use the 
  83. DSZ.LOG file to update the FILELIST.BBS, removing any files which were not 
  84. actually transmitted.  Server type protocols like Bimodem, which can allow 
  85. additional files to be specified for download after a command has begun, 
  86. can add the additional files to the FILELIST.BBS before returning.  
  87.  
  88.     If you do edit this file, make sure that you update the total size 
  89. (which is expressed in 128 byte blocks, ie. 1 = 128 bytes) and be sure that 
  90. your procedure ultimately returns an error code of zero to Searchlight.
  91.  
  92.